package com.file.tool.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(FileToolProperties.class)
@ConditionalOnProperty(prefix = "file.tool", value = "enabled", matchIfMissing = true)
public class FileToolAutoConfiguration {

    @Autowired
    private FileToolProperties fileToolProperties;
    @Bean
    public void fileToolService(){
        System.out.println("get properties template Path prefix : "+fileToolProperties.getTemplatePathPrefix());
    }

}
